From c0535d5e52c6d6f5cb1d5b8cc3be1eb8f69244be Mon Sep 17 00:00:00 2001 From: "rgr22@boulderdash.cl.cam.ac.uk" Date: Tue, 24 Jun 2003 12:05:12 +0000 Subject: [PATCH] bitkeeper revision 1.257 (3ef83e78zlLnwymIwasqq3xZQcUx-g) minor fix: moved logging to locations suggested by KAF --- xen/net/dev.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/net/dev.c b/xen/net/dev.c index 7619fa5361..ca53e121e1 100644 --- a/xen/net/dev.c +++ b/xen/net/dev.c @@ -574,6 +574,10 @@ void deliver_packet(struct sk_buff *skb, net_vif_t *vif) out: make_rx_response(vif, rx->id, size, status, offset); + + /* record this so they can be billed */ + vif->total_packets_received++; + vif->total_bytes_received += size; } /** @@ -765,6 +769,10 @@ static void net_tx_action(unsigned long unused) skb->data_len = tx->size - PKT_PROT_LEN; skb->len = tx->size; + /* record the transmission so they can be billed */ + vif->total_packets_sent++; + vif->total_bytes_sent += tx->size; + /* Transmit should always work, or the queue would be stopped. */ if ( dev->hard_start_xmit(skb, dev) != 0 ) { @@ -1882,10 +1890,6 @@ long do_net_update(void) make_tx_response(vif, tx.id, RING_STATUS_OK); } - /* record the transmission so they can be billed */ - vif->total_packets_sent++; - vif->total_bytes_sent += tx.size; - tx_unmap_and_continue: unmap_domain_mem(g_data); spin_unlock_irq(¤t->page_lock); @@ -2041,10 +2045,6 @@ static void make_rx_response(net_vif_t *vif, guest_event_notify(cpu_mask); } spin_unlock_irqrestore(&vif->rx_lock, flags); - - /* record this so they can be billed */ - vif->total_packets_received++; - vif->total_bytes_received += size; } -- 2.30.2